package skins {
	import mx.skins.ProgrammaticSkin;
	
	/**
	 * Draws an X icon.
	 */
	public class DeleteSkin extends ProgrammaticSkin {
		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
			if (name == "upSkin" || name == "downSkin") {
				// Draw background.
				graphics.clear();
				graphics.beginFill(0x222222);
				graphics.drawRect(0,0, 10, 10);
				graphics.endFill();
				
				// Draw X.		
				graphics.lineStyle(2, 0xFFFFFF);
				graphics.moveTo(2, 2);
				graphics.lineTo(8, 8);
				graphics.moveTo(2, 8);
				graphics.lineTo(8, 2);
			} else if (name == "overSkin") {
				// Draw background.		
				graphics.clear();
				graphics.beginFill(0x888888);
				graphics.drawRect(0,0, 10, 10);
				graphics.endFill();
				
				// Draw X.
				graphics.lineStyle(2, 0xFFFFFF);
				graphics.moveTo(2, 2);
				graphics.lineTo(8, 8);
				graphics.moveTo(2, 8);
				graphics.lineTo(8, 2);			
			}
		}
	}
}